$baseColor: #dda62f;
$uni-bg-color: #f1f1f1;

@mixin testCss() {
}

@mixin overflow($line: 1) {
    overflow: hidden;
    text-overflow: ellipsis;
    @if $line ==1 {
        white-space: nowrap;
    }

    @else {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: $line;
    }
}

/* 背景色渐变 */
@mixin gradient($colorStar, $colorEnd, $direction: to right, $starX: 0%, $starY: 100%, $type: linear, $clip: background) {
    background: #{$type}-gradient($direction, $colorStar $starX, $colorEnd $starY);

    @if ($clip ==text) {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
}


@mixin align($position, $direction: 1) {
    display: flex;

    @if $position ==v-center or $position ==center {
        flex-wrap: wrap;
        align-items: center;
        align-content: center;
    }

    @if $position ==h-center or $position ==center {
        justify-content: center;
    }

    @if $position ==top {
        align-items: flex-start;
    }

    @if $position ==bottom {
        align-items: flex-end;
    }

    @if $position ==left {
        justify-content: flex-start;
    }

    @if $position ==right {
        justify-content: flex-end;
    }

    @if $position ==h-space-between or $position ==v-space-between {
        justify-content: space-between;
    }

    @if $position ==h-space-around or $position ==v-space-around {
        justify-content: space-around;
    }

    @if $position ==v-space-between or $position ==v-space-around {
        flex-direction: column;
    }

    @if not ($direction ==1) {
        flex-direction: $direction;
    }
}
